<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>后台登录</title>
		<script src="js/jquery.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css" href="css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="css/demo.css" />
		<!--必要样式-->
		<link rel="stylesheet" type="text/css" href="css/component.css" />
		<!--[if IE]>
    <script src="${root}/js/html5.js"></script>
    <![endif]-->
	</head>

	<body>
		<div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
					<canvas id="demo-canvas"></canvas>
					<div class="logo_box">
						<h3>后台登录</h3>
						<form action="" id="adminLogin">
							<div style="color: red;text-align: center;" id="warn"></div>
							<br/>
							<div class="input_outer">
								<span class="u_user"></span>
								<input name="logname" id="username" required class="text" style="color: #FFFFFF !important;background:rgba(0,0,0,0.1);" type="text" placeholder="请输入账户">
							</div>
							<div class="input_outer">
								<span class="us_uer"></span>
								<input name="logpass" id="password" required class="text" style="color: #FFFFFF !important; position:absolute; z-index:100;" value="" type="password" placeholder="请输入密码">
							</div>
							<div class="mb2">
								<input id="btnSubmit" type="button" class="act-but submit" style="outline:none;color: #FFFFFF;width: 100%;border: 0;" value="登录">
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!-- /container -->
		<script src="js/TweenLite.min.js"></script>
		<script src="js/EasePack.min.js"></script>
		<script src="js/rAF.js"></script>
		<script src="js/demo-1.js"></script>
	</body>
	<script type="text/javascript">
		$("#btnSubmit").click(function(ev) {
			var username = $("#username").val();
			var password = $("#password").val();
			if(username == "" || password == "") {
				alert("请输入用户名和密码")
			} else {
				$.ajax({
					type: "post",
					url: "http://120.79.244.56:8088/manage/login.do",
					data: {
						username: username,
						password: password,
					},
					xhrFields: {
						withCredentials: true
					},
					success: function(jackson) {
						if(jackson.status == 1) {
                            layer.msg(jackson.msg, {icon: 1, time: 1000});
						} else if(jackson.status == 0) {
							window.location.href = "index.html"
						}
					}
				});
			};
		});
	</script>

</html>